#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <math.h>
int su(int x)
{
    if (x == 1)
        return 0;
    for (int i = 2; i <= sqrt(x); i++)
    {
        if (x % i == 0)
            return 0;
    }
    return 1;
}

int main() {
    int n = 0;
    scanf("%d", &n);
    int x = 0;
    while (n--)
    {
        scanf("%d", &x);
        if (su(x) == 1)
            printf("true\n");
        else
            printf("false\n");
    }
    return 0;
}